/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import com.jfinal.core.Controller;
import java.util.List;
import model.User;

/**
 *
 * @author Lx
 */
public class Indexcontroller extends Controller {
    public void index(){
        render("index.jsp");
    }
    public void login() {
        redirect("/");
//        boolean flag=false;
//        String msg="";
//        String name=getPara("name");
//        String pwd=getPara("pwd");
//        List<User> users=User.dao.find("select * from user where name='"+name+"'and pwd='"+pwd+"'");
//        if(users.size()>0){
//            setSessionAttr("id",users.get(0));
//            redirect("/");
//        }else{
//            renderHtml("<script>alert();</script>");
//        }
    }
}
